#include <iostream>
#include <fstream>

using namespace std;

int main(int argc, char *argv[])
{
    if (argc < 2) {
        cout << "usage: " << argv[0] << " <output file>" << endl;
        return 0;
    }

    ofstream out(argv[1]);
    string line; 

    // 从控制台读取字符串, 并输出到指定文件中
    while (getline(cin, line)) {
        out << line << endl;
    }

    return 0;
}
